-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New tests for human readable values #1623
Conversation
Conflicts: test/test_ui_commands.py
moved the tests of ui/__init__ to a new test file
Great! But yes indeed—it looks like the exponents in the original code are wrong. 😢 Would you mind fixing them too? |
I will be happy to fix it, but which style do we want to use? |
Good question. Let's say XiB (i.e., powers of two) since that's closest to what we're doing (or thought we were doing) already. |
using unit e.g. 5.4 KiB instead of 5.4 KB now
So i think i fixed it now. |
Awesome. ✨ I'll hit the merge button now, but would you mind also adding a note to the changelog about the fix? |
New tests for human readable values
Done. Hope you enjoy it |
Looks perfect. |
Here i added some tests for the output of human readable values.
Especially the test of human_bytes is written as it would success now. But is the implementation really correct?
As you see at https://en.wikipedia.org/wiki/Petabyte a Petabyte is 10^15 bytes and not 2^50 bytes as implemented.